/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gblend.largegraph.structure;

import gblend.adjlistgraph.*;
import java.util.HashMap;
import java.util.Vector;
/**
 *
 * @author HO HOANG HUNG
 */
public class LGraphTree {
    private HashMap<Integer,ALGraph> leaves;
    private HashMap<Integer,ALGraph> nodes;

    public LGraphTree(ALGraph root){
        nodes = new HashMap<Integer,ALGraph>();
        nodes.put(1, root);
        leaves = new HashMap<Integer,ALGraph>();
        leaves.put(1,root);
    }

    public HashMap<Integer,ALGraph> getLeaves(){
        return leaves;
    }

    public void insertGraph(int index,ALGraph parent,ALGraph left,ALGraph right){
        leaves.remove(index);
        nodes.put(index, parent);
        nodes.put(2*index, left);
        nodes.put(2*index+1, right);
    }

    public void saveToDisk(String path){
        
    }
}
